<template>
    <!--案件详情——公共页面——开始-->
    <div class="notice-details" v-loading="loading">
        <div class="left-info">
            <p class="title-name">案件分配</p>
            <div class="info-content">
                <div style="height:calc(100% - 3.75rem);overflow-y: auto;">
                    <div class="top-box">
                        <div class="block-item">
                            <span class="item-name">案件名称：</span>
                            <span class="item-value">
                                        <el-input v-model="form.eventName" disabled></el-input>
                                    </span>
                        </div>
                        <div class="block-item">
                            <span class="item-name">案件来源：</span>
                            <span class="item-value">
                                        <el-input v-model="form.eventSrcTypeName" disabled></el-input>
                                    </span>
                        </div>
                        <div class="block-item">
                            <span class="item-name">案件类别：</span>
                            <span class="item-value">
                                            <el-input v-model="form.eventTypeName" disabled></el-input>
                                        </span>
                        </div>
                        <div class="block-item">
                            <span class="item-name">案件大类：</span>
                            <span class="item-value">
                                            <el-input v-model="form.eventTypeLv1Name" disabled></el-input>
                                        </span>
                        </div>
                        <div class="block-item">
                            <span class="item-name">案件小类：</span>
                            <span class="item-value">
                                            <el-input v-model="form.eventTypeLv2Name" disabled></el-input>
                                        </span>
                        </div>
                        <div class="block-item">
                            <span class="item-name">处置时限：</span>
                            <span class="item-value">
                                            <el-input v-model="form.time" disabled></el-input>
                                        </span>
                        </div>
                        <div class="line-item">
                            <span class="item-name">立案条件：</span>
                            <span class="item-value">
                                        <el-input v-model="form.archivesTypeLeveThree.starConditions"
                                                  disabled></el-input>
                                    </span>
                        </div>
                        <div class="block-item">
                            <span class="item-name">所属部门：</span>
                            <span class="item-value">
                                            <el-input v-model="form.deptName" disabled></el-input>
                                        </span>
                        </div>
                        <div class="block-item">
                            <span class="item-name">一级行业：</span>
                            <span class="item-value">
                                            <el-input v-model="form.industryTypeLv1Name" disabled></el-input>
                                        </span>
                        </div>
                        <div class="block-item">
                            <span class="item-name">二级行业：</span>
                            <span class="item-value">
                                            <el-input v-model="form.industryTypeLv2Name" disabled></el-input>
                                        </span>
                        </div>
                        <div class="block-item">
                            <span class="item-name">是否开放景区：</span>
                            <span class="item-value">
                                        <span v-if="form.isOpenScenic == '0'">
                                            <el-input value="否" disabled></el-input>
                                        </span>
                                        <span v-if="form.isOpenScenic == '1'">
                                            <el-input value="是" disabled></el-input>
                                        </span>
                                    </span>
                        </div>
                        <div class="line-item">
                            <span class="item-name">发生位置：</span>
                            <span class="item-value">
                                        <el-input v-model="form.eventAddress" disabled></el-input>
                                    </span>
                        </div>
                        <div class="line-item">
                            <span class="item-name">案件描述：</span>
                            <span class="item-value">
                                        <el-input type="textarea" v-model="form.eventDescribe" maxlength="500"
                                                  show-word-limit disabled style="height:100%;"
                                                  class="desc-textarea"></el-input><!--:rows="2"-->
                                    </span>
                        </div>
                        <div class="block-item">
                            <span class="item-name">责任主体：</span>
                            <span class="item-value">
                                                <el-input v-model="form.deptParentName" disabled></el-input>
                                            </span>
                        </div>
                        <div class="block-item">
                            <span class="item-name">上报电话：</span>
                            <span class="item-value">
                                        <el-input v-model="form.eventReportPhone" disabled></el-input>
                                    </span>
                        </div>
                        <div class="block-item">
                            <span class="item-name">上报人姓名：</span>
                            <span class="item-value">
                                        <el-input v-model="form.eventReportName" disabled></el-input>
                                    </span>
                        </div>
                        <div class="block-item">
                            <span class="item-name">上报人电话：</span>
                            <span class="item-value">
                                        <el-input v-model="form.eventCallPhone" disabled></el-input>
                                    </span>
                        </div>
                        <div class="block-box">
                            <div class="block-item">
                                <span class="item-name">是否延期：</span>
                                <span class="item-value">
                                            <el-input v-model="form.archivesTypeLeveThree.isYq" disabled></el-input>
                                        </span>
                            </div>
                            <div class="block-item">
                                <span class="item-name">是否缓办：</span>
                                <span class="item-value">
                                            <el-input v-model="form.archivesTypeLeveThree.isHb" disabled></el-input>
                                        </span>
                            </div>
                        </div>
                        <div class="block-box">
                            <div class="block-item">
                                <span class="item-name">是否突发：</span>
                                <span class="item-value">
                                             <el-input v-model="form.archivesTypeLeveThree.isTf" disabled></el-input>
                                        </span>
                            </div>
                            <div class="block-item">
                                <span class="item-name">是否紧急：</span>
                                <span class="item-value">
                                            <el-input v-model="form.archivesTypeLeveThree.isJj" disabled></el-input>
                                        </span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="map-box">
                    <div id="myMap"></div>
                </div>
            </div>
            <div class="foot-btn">
                <!--<el-button type="primary" size="small" @click="toStreetView">查看街景</el-button>-->
                <el-button v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjxy'"
                           type="warning" size="small" icon="el-icon-download" @click="exportCasePDF">导出</el-button>
                <!--待转办-->
                <div class="btns" v-if="form.eventDealStatus == '0101'">
                    <el-button type="warning" size="small" @click="editCase(0)"  v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjxy'">编辑</el-button>
                    <el-button type="primary" size="small" @click="openZbdialog()"  v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjxy'">转办</el-button>
                    <el-button type="primary" size="small" @click="openXaDialog()"  v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjxy'">销案</el-button>
                    <el-button type="primary" size="small" @click="openGqdialog()" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjxy'">挂起申请</el-button>
                    <el-button type="primary" size="small" @click="openJaDialog('other')" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjxy'">其他方式结案</el-button>
                </div>

                <!--待受理-->
                <div class="btns" v-if="form.eventDealStatus == '0201'">
                    <el-button type="primary" size="small" @click="openDbdialog()" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjxy'">督办</el-button>
                    <el-button type="primary" size="small" @click="openGqdialog()" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjxy'">挂起申请</el-button>
                    <el-button type="primary" size="small" @click="openHtDialog()" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'bdjgjxy'">回退</el-button>
                    <el-button type="primary" size="small" @click="saveSl()" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'bdjgjxy'">受理</el-button>
                    <el-button type="primary" size="small" @click="openJaDialog('other')" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjxy'">其他方式结案</el-button>
                </div>

                <!--待派遣-->
                <div class="btns" v-if="form.eventDealStatus == '0202'">
                    <el-button type="primary" size="small" @click="openDbdialog()" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjxy' || createUser.role.roleKey == 'ptjl'">督办</el-button>
                    <el-button type="primary" size="small" @click="openGqdialog()" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjxy'">挂起申请</el-button>
                    <!--<el-button type="primary" size="small" @click="openHtDialog()" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'bdjgjxy'">回退</el-button>-->
                    <el-button type="primary" size="small" @click="openPqdialog()" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'bdjgjxy'">派遣</el-button>
                    <el-button type="primary" size="small" @click="openHbDiaolog()" v-if="form.archivesTypeLeveThree.isHb == '是' && (createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'bdjgjxy')">缓办申请</el-button>
                    <el-button type="primary" size="small" @click="openJaDialog('other')" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjxy'">其他方式结案</el-button>
                </div>

                <!--待处置-->
                <div class="btns" v-if="form.eventDealStatus == '0203'">
                    <el-button type="primary" size="small" @click="openDbdialog()">督办</el-button>
                    <el-button type="primary" size="small" @click="openGqdialog()" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjxy'">挂起申请</el-button>
                    <el-button type="primary" size="small" @click="openYqDialog()" v-if="form.archivesTypeLeveThree.isYq == '是' && (createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'bdjgjxy')">延期申请</el-button>
                    <el-button type="primary" size="small" @click="openJaDialog('other')" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjxy'">其他方式结案</el-button>
                </div>

                <!--处置机构待审核-->
                <div class="btns" v-if="form.eventDealStatus == '0204'">
                    <el-button type="primary" size="small" @click="openDbdialog()" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjxy' || createUser.role.roleKey == 'ptjl'">督办</el-button>
                    <el-button type="primary" size="small" @click="openGqdialog()" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjxy'">挂起申请</el-button>
                    <el-button type="primary" size="small" @click="openPqdialog()"  v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'bdjgjxy'">重新派遣</el-button>
                    <el-button type="primary" size="small" @click="openczjgShDialog()"  v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'bdjgjxy'">处置机构审核</el-button>
                    <el-button type="primary" size="small" @click="openJaDialog('other')" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjxy'">其他方式结案</el-button>
                 </div>

                <!--监理待审核-->
                <div class="btns" v-if="form.eventDealStatus == '0205'">
                    <el-button type="primary" size="small" @click="openDbdialog()" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjxy'">督办</el-button>
                    <el-button type="primary" size="small" @click="openGqdialog()" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjxy'">挂起申请</el-button>
                    <el-button type="primary" size="small" @click="opencjlShDialog()" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjl'">监理审核</el-button>
                    <el-button type="primary" size="small" @click="openBhDialog()" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjl'">驳回</el-button>
                    <el-button type="primary" size="small" @click="openJaDialog('other')" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjxy'">其他方式结案</el-button>
                </div>

                <!--待结案-->
                <div class="btns" v-if="form.eventDealStatus == '0206'">
                    <el-button type="primary" size="small" @click="openJaDialog('other')" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjxy'">其他方式结案</el-button>
                    <el-button type="primary" size="small" @click="openJaDialog()" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjxy'">结案</el-button>
                    <el-button type="primary" size="small" @click="openCxzbDialog()" v-if="createUser.role.roleKey == 'admin' || createUser.role.roleKey == 'ptjxy'">重新转办</el-button>
                </div>

                <!--其他-->
                <!--挂起-->
                <div class="btns" v-if="form.eventDealStatus == '0004'">
                    <el-button type="primary" size="small" @click="openJsgqDialog()">结束挂起</el-button>
                </div>

                <div class="btns">
                    <el-button type="primary" size="small" @click="toStreetView">街景</el-button>
                </div>
            </div>
        </div>
        <div class="right-process">
            <el-timeline>
                <el-timeline-item
                        class="timelineitem"
                        v-for="(item,i) in eventLogList"
                        :key="i"
                        :timestamp="item.typeName + ' '  + item.createTime" placement="top" :id="'title' + item.typeCode">
                    <el-card>
                        <div class="timeline_desc">
                            <h4>{{item.describe}}</h4>
                            <p>{{item.remark}}</p>
                        </div>
                        <!--<ul class="timeline_images" :id="'timeline_images' + index"></ul>-->
                        <viewer :images="smallArr['arr' + i]" class="timeline_images" :id="'timeline_images' + i" v-if="bigArr['arr' + i].length>0 && smallArr['arr' + i].length>0">
                            <li class="images_item" v-for="(itemone,indexone) in smallArr['arr' + i]" :key="indexone">
                                <img :data-original="url  + bigArr['arr' + i][indexone]" :src="url  + itemone" alt="">
                            </li>
                        </viewer>
                        <viewer :images="bigArr['arr' + i]" class="timeline_images" :id="'timeline_images' + i" v-if="bigArr['arr' + i].length>0 && smallArr['arr' + i].length===0">
                            <li class="images_item" v-for="(itemone,indexone) in bigArr['arr' + i]" :key="indexone">
                                <img :data-original="url + itemone" :src="url + itemone" alt="">
                            </li>
                        </viewer>
                    </el-card>
                </el-timeline-item>
            </el-timeline>
        </div>

        <!--编辑案件-->
        <el-dialog
                class="every-dialog"
                title="编辑案件"
                :visible.sync="editDialogVisible"
                v-if="editDialogVisible"
                :close-on-click-modal="false"
                width="800px">
            <div class="edit-dialog-content" v-loading="editDialogloading">
                <div class="block-item">
                    <span class="item-name">案件名称：</span>
                    <span class="item-value">
                        <el-input v-model="editForm.eventName" disabled></el-input>
                    </span>
                </div>
                <div class="block-item">
                    <span class="item-name"><i>*</i>案件类别：</span>
                    <span class="item-value">
                        <el-select v-model="editForm.eventType" @change="getCaseBigClass(true)">
                            <el-option v-for="item in caseTypeData" :value="item.code" :label="item.name"
                                       :key="item.id"></el-option>
                        </el-select>
                    </span>
                </div>
                <div class="block-item">
                    <span class="item-name"><i>*</i>案件大类：</span>
                    <span class="item-value">
                        <el-select v-model="editForm.eventTypeLv1" @change="getCaseSmallClass(true)"
                                   :disabled="editForm.eventType === ''">
                            <el-option v-for="item in caseBigClassData" :value="item.id" :label="item.name"
                                       :key="item.id"></el-option>
                        </el-select>
                    </span>
                </div>
                <div class="block-item">
                    <span class="item-name"><i>*</i>案件小类：</span>
                    <span class="item-value">
                        <el-select v-model="editForm.eventTypeLv2" :disabled="editForm.eventTypeLv1 === ''"
                                   @change="getCaseCondition(true)">
                            <el-option v-for="item in caseSmallClassData" :value="item.id" :label="item.name"
                                       :key="item.id"></el-option>
                        </el-select>
                    </span>
                </div>
                <div class="line-item">
                    <span class="item-name"><i>*</i>立案条件：</span>
                    <span class="item-value">
                        <el-select v-model="editForm.eventTypeLv3" :disabled="editForm.eventTypeLv2 === ''"
                                   @change="getOtherInfo">
                            <el-option v-for="item in caseConditionData" :value="item.id" :label="item.name"
                                       :key="item.id"></el-option>
                        </el-select>
                    </span>
                </div>
                <div class="block-item">
                    <span class="item-name">责任主体：</span>
                    <span class="item-value">
                        <el-input v-model="editForm.deptParentName" disabled></el-input>
                    </span>
                </div>
                <div class="block-item">
                    <span class="item-name">所属部门：</span>
                    <span class="item-value">
                        <el-input v-model="editForm.deptName" disabled></el-input>
                    </span>
                </div>
                <div class="block-item">
                    <span class="item-name">一级行业：</span>
                    <span class="item-value">
                        <el-input v-model="editForm.industryTypeLv1Name" disabled></el-input>
                    </span>
                </div>
                <div class="block-item">
                    <span class="item-name">二级行业：</span>
                    <span class="item-value">
                        <el-input v-model="editForm.industryTypeLv2Name" disabled></el-input>
                    </span>
                </div>
                <div class="block-item">
                    <span class="item-name">是否延期：</span>
                    <span class="item-value">
                        <el-input v-model="editForm.archivesTypeLeveThree.isYq" disabled></el-input>
                    </span>
                </div>
                <div class="block-item">
                    <span class="item-name">是否缓办：</span>
                    <span class="item-value">
                        <el-input v-model="editForm.archivesTypeLeveThree.isHb" disabled></el-input>
                    </span>
                </div>
                <div class="block-item">
                    <span class="item-name">是否突发：</span>
                    <span class="item-value">
                         <el-input v-model="editForm.archivesTypeLeveThree.isTf" disabled></el-input>
                    </span>
                </div>
                <div class="block-item">
                    <span class="item-name">是否紧急：</span>
                    <span class="item-value">
                        <el-input v-model="editForm.archivesTypeLeveThree.isJj" disabled></el-input>
                    </span>
                </div>
                <div class="line-item">
                    <span class="item-name"><i>*</i>案件描述：</span>
                    <span class="item-value">
                            <el-input type="textarea" :rows="2" v-model="editForm.eventDescribe" maxlength="500"
                                      show-word-limit></el-input>
                        </span>
                </div>
            </div>
            <div class="dialog-footer">
                <el-button type="primary" @click="editCase(1)" :disabled="editDialogloading">保 存</el-button>
                <el-button @click="editDialogVisible = false">取 消</el-button>
            </div>
        </el-dialog>

        <!--转办-->
        <el-dialog
                title="案件转办"
                :visible.sync="dialogVisiblezb"
                :close-on-click-modal="false"
                :width="dialogWidth">
            <div class="dialog-content">
                <div class="line-item line-itemW">
                    <span class="item-name"><i>*</i>转办机构：</span>
                    <span class="item-value">
                            <el-select v-model="transfer.organizationid" size="small">
                                 <el-option
                                         v-for="(item,index) in transfer.organizationData"
                                         :key="index"
                                         :label="item.name"
                                         :value="item.code" >
                                 </el-option>
                            </el-select>
                        </span>
                </div>
                <div class="line-item">
                    <span class="item-name">转办描述：</span>
                    <span class="item-value">
                            <el-input type="textarea" :rows="4" placeholder="请输入内容" v-model="transfer.remark" maxlength="500"
                                      show-word-limit></el-input>
                        </span>
                </div>
            </div>
            <div class="dialog-footer">
                <el-button @click="dialogVisiblezb = false">取 消</el-button>
                <el-button type="primary" @click="saveZB()">确 定</el-button>
            </div>
        </el-dialog>
        <!--督办-->
        <el-dialog
                title="案件督办"
                :visible.sync="dialogVisibledb"
                :close-on-click-modal="false"
                width="600px">
            <!--案件督办-->
            <div class="dialog-content">
                <div class="line-item">
                    <span class="item-name"><i>*</i>督办意见：</span>
                    <span class="item-value">
                            <el-input type="textarea" :rows="4" placeholder="请输入内容" v-model="eventOversee.contents" maxlength="500"
                                      show-word-limit></el-input>
                        </span>
                </div>
            </div>
            <div class="dialog-footer">
                <el-button @click="dialogVisibledb = false">取 消</el-button>
                <el-button type="primary" @click="saveDb()">确 定</el-button>
            </div>
        </el-dialog>
        <!--派遣-->
        <el-dialog
                class="paiqian-dialog"
                title="案件派遣"
                :visible.sync="dialogVisiblepq"
                :close-on-click-modal="false"
                :width="dialogWidth">
            <div class="dialog-content">
                <div class="line-item line-itemW">
                    <!--<span class="item-name"><i>*</i>派遣人员：</span>
                    <span class="item-value">
                            <el-select v-model="dispatch.sendTargetId" size="small">
                                <el-option
                                        v-for="(item,index) in dispatch.sendTargetIdData"
                                        :key="index"
                                        :label="item.nickName"
                                        :value="item.userId">
                                </el-option>
                            </el-select>
                        </span>-->
                    <div class="item-value paiqian" >
                        <div class="paiqianTop" v-if="dispatch.sendTargetId === ''">
                            <p class="p1">暂无派遣人员</p>
                            <p class="p2">请选择要派遣的人员</p>
                            <img src="../../../assets/image/paiqianopen1.png" alt="">
                        </div>
                        <div class="selectPerson" id="hsxjy" v-if="dispatch.sendTargetId != ''">
                            <div class="InspectorMes">
                                <img src="../../../assets/image/name.png">
                                <span class="name">{{dispatch.selectPq}}</span>
                                <span class="break">

                                </span>
                                <img src="../../../assets/image/paiqianphone.png">
                                <span class="phone">{{dispatch.selectPhone}}</span>
                            </div>
                        </div>
                        <div class="Inspectors">
                            <div class="tips"><span>派遣人员</span></div>
                            <div class="xjyDiv" id="xjyDiv">
                                <div class="dinp1" v-for="(item,index) in dispatch.sendTargetIdData" :key="item.index">
                                    <el-radio v-model="dispatch.sendTargetId" :label="item.userId" @change="radioChange()"  style="width:100%;line-height:0.3rem;height:0.375rem;">
                                        <span>{{item.nickName}}</span>
                                        <span><img src="../../../assets/image/paiqianphone.png" alt="" style="width: 0.2rem;">{{item.phonenumber}}</span>
                                    </el-radio>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="dialog-footer">
                <el-button @click="dialogVisiblepq = false">取 消</el-button>
                <el-button type="primary" @click="savePq()">确 定</el-button>
            </div>
        </el-dialog>
        <!--处置机构审核-->
        <el-dialog
                title="案件审核"
                :visible.sync="dialogVisibleczjg"
                :close-on-click-modal="false"
                width="600px">
            <!--案件办理的挂起-->
            <div class="dialog-content">
                <div class="line-item">
                    <span class="item-name">审核备注：</span>
                    <span class="item-value">
                            <el-input type="textarea" :rows="4" placeholder="请输入内容" v-model="czjgremark" maxlength="500"
                                      show-word-limit></el-input>
                        </span>
                </div>
            </div>
            <div class="dialog-footer">
                <el-button @click="dialogVisibleczjg = false">取 消</el-button>
                <el-button type="primary" @click="saveCzjgSh()" :disabled="dialogLoading">确 定</el-button>
            </div>
        </el-dialog>
        <!--监理审核-->
        <el-dialog
                title="案件审核"
                :visible.sync="dialogVisiblejl"
                :close-on-click-modal="false"
                width="600px">
            <!--案件办理的挂起-->
            <div class="dialog-content">
                <div class="line-item">
                    <span class="item-name">审核备注：</span>
                    <span class="item-value">
                            <el-input type="textarea" :rows="4" placeholder="请输入内容" v-model="jlremark" maxlength="500"
                                      show-word-limit></el-input>
                        </span>
                </div>
            </div>
            <div class="dialog-footer">
                <el-button @click="dialogVisiblejl = false">取 消</el-button>
                <el-button type="primary" @click="saveJlSh()" :disabled="dialogLoading">确 定</el-button>
            </div>
        </el-dialog>
        <!--挂起申请-->
        <el-dialog
                title="案件挂起申请"
                :visible.sync="dialogVisiblegq"
                :close-on-click-modal="false"
                width="600px">
            <!--案件办理的挂起-->
            <div class="dialog-content" v-loading="dialogLoading">
                <div class="line-item line-itemW">
                    <span class="item-name"><i>*</i>挂起原因：</span>
                    <span class="item-value">
                            <el-select v-model="blgq.pendReason" size="small">
                                 <el-option
                                         v-for="(item,index) in blgq.pendReasonData"
                                         :key="index"
                                         :label="item.name"
                                         :value="item.code" >
                                 </el-option>
                            </el-select>
                        </span>
                </div>
                <div class="line-item">
                    <span class="item-name">备注：</span>
                    <span class="item-value">
                            <el-input type="textarea" :rows="4" placeholder="请输入内容" v-model="blgq.pendRemark" maxlength="500"
                                      show-word-limit></el-input>
                    </span>
                </div>
            </div>
            <div class="dialog-footer">
                <el-button @click="dialogVisiblegq = false">取 消</el-button>
                <el-button type="primary" @click="saveGq()" :disabled="dialogLoading">确 定</el-button>
            </div>
        </el-dialog>
        <!--结束挂起-->
        <el-dialog
                title="案件结束挂起"
                :visible.sync="dialogVisiblejsgq"
                :close-on-click-modal="false"
                width="600px">
            <!--案件办理的挂起-->
            <div class="dialog-content">
                <div class="line-item">
                    <span class="item-name">备注：</span>
                    <span class="item-value">
                            <el-input type="textarea" :rows="4" placeholder="请输入内容" v-model="remark" maxlength="500"
                                      show-word-limit></el-input>
                        </span>
                </div>
            </div>
            <div class="dialog-footer">
                <el-button @click="dialogVisiblejsgq = false">取 消</el-button>
                <el-button type="primary" @click="saveJsgq()" :disabled="dialogLoading">确 定</el-button>
            </div>
        </el-dialog>
        <!--缓办申请-->
        <el-dialog
                title="案件缓办申请"
                class="upload-image"
                :visible.sync="dialogVisiblehb"
                :close-on-click-modal="false"
                width="630px">
            <!--案件办理的挂起-->
            <div class="dialog-content">
                <div class="line-item" style="margin-top: 0.0625rem;">
                    <span class="item-name"><i>*</i>缓办描述：</span>
                    <span class="item-value">
                            <el-input type="textarea" :rows="4" placeholder="请输入内容" v-model="hbreason" maxlength="500"
                                      show-word-limit></el-input>
                        </span>
                </div>
                <div class="line-item">
                    <span class="item-name"><i>*</i>图片上传：</span>
                    <el-upload
                            action="#"
                            list-type="picture-card"
                            :auto-upload="false"
                            :file-list="fileList"
                            :on-change="uploadChange"
                            style="flex:1;">
                        <i slot="default" class="el-icon-plus"></i>
                        <div slot="file" slot-scope="{file}">
                            <img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
                            <span class="el-upload-list__item-actions">
                            <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
                                <i class="el-icon-zoom-in"></i>
                            </span>
                            <span class="el-upload-list__item-delete" @click="handleRemove(file)">
                                <i class="el-icon-delete"></i>
                            </span>
                        </span>
                        </div>
                    </el-upload>
                </div>
            </div>
            <div class="dialog-footer">
                <el-button @click="dialogVisiblehb = false">取 消</el-button>
                <el-button type="primary" @click="saveHb()" :disabled="dialogLoading">确 定</el-button>
            </div>
        </el-dialog>
        <el-dialog title="查看图片" :visible.sync="viewImageDialog"
                   :close-on-click-modal="false" class="bigImg">
            <img width="100%" :src="dialogImageUrl" alt="">
        </el-dialog>
        <!--延期申请-->
        <el-dialog
                title="案件延期申请"
                :visible.sync="dialogVisibleyq"
                :close-on-click-modal="false"
                width="600px">
            <!--案件办理的挂起-->
            <div class="dialog-content">
                <div class="line-item">
                    <span class="item-name"><i>*</i>延期原因：</span>
                    <span class="item-value">
                            <el-input type="textarea" :rows="4" placeholder="请输入内容" v-model="yqreason" maxlength="500"
                                      show-word-limit></el-input>
                        </span>
                </div>
            </div>
            <div class="dialog-footer">
                <el-button @click="dialogVisibleyq = false">取 消</el-button>
                <el-button type="primary" @click="saveyq()" :disabled="dialogLoading">确 定</el-button>
            </div>
        </el-dialog>
        <!--案件驳回-->
        <el-dialog
                title="案件驳回"
                :visible.sync="dialogVisiblebh"
                :close-on-click-modal="false"
                width="600px">
            <!--案件驳回-->
            <div class="dialog-content">
                <div class="line-item">
                    <span class="item-name"><i>*</i>驳回备注：</span>
                    <span class="item-value">
                            <el-input type="textarea" :rows="4" placeholder="请输入内容" v-model="eventReject.remark" maxlength="500"
                                      show-word-limit></el-input>
                        </span>
                </div>
            </div>
            <div class="dialog-footer">
                <el-button @click="dialogVisiblebh = false">取 消</el-button>
                <el-button type="primary" @click="saveBh()">确 定</el-button>
            </div>
        </el-dialog>
        <!--案件回退-->
        <el-dialog
                title="案件回退"
                :visible.sync="dialogVisibleht"
                :close-on-click-modal="false"
                width="600px">
            <!--案件督办-->
            <div class="dialog-content">
                <div class="line-item">
                    <span class="item-name"><i>*</i>回退描述：</span>
                    <span class="item-value">
                            <el-input type="textarea" :rows="4" placeholder="请输入内容" v-model="backoff.eventDescribe" maxlength="500"
                                      show-word-limit></el-input>
                        </span>
                </div>
            </div>
            <div class="dialog-footer">
                <el-button @click="dialogVisibleht = false">取 消</el-button>
                <el-button type="primary" @click="saveHt()">确 定</el-button>
            </div>
        </el-dialog>
        <!--重新转办-->
        <el-dialog
                title="案件重新转办"
                :visible.sync="dialogVisiblecxzb"
                :close-on-click-modal="false"
                :width="dialogWidth">
            <div class="dialog-content">
                <div class="line-item line-itemW">
                    <span class="item-name"><i>*</i>转办机构：</span>
                    <span class="item-value">
                        <el-select v-model="transfer.organizationid" size="small">
                             <el-option
                                     v-for="(item,index) in transfer.organizationData"
                                     :key="index"
                                     :label="item.name"
                                     :value="item.code" >
                             </el-option>
                        </el-select>
                    </span>
                </div>
                <div class="line-item">
                    <span class="item-name">转办描述：</span>
                    <span class="item-value">
                        <el-input type="textarea" :rows="4" placeholder="请输入内容" v-model="transfer.remark" maxlength="500"
                                  show-word-limit></el-input>
                    </span>
                </div>
            </div>
            <div class="dialog-footer">
                <el-button @click="dialogVisiblecxzb = false">取 消</el-button>
                <el-button type="primary" @click="savecxzb()">确 定</el-button>
            </div>
        </el-dialog>
        <!--结案-->
        <el-dialog
                :title="jaTitle"
                :visible.sync="dialogVisibleja"
                :close-on-click-modal="false"
                :width="dialogWidth">
            <div class="dialog-content">
                <div v-if="closeCaseType === 0">
                    <div class="line-item">
                        <span class="item-name">结案原因：</span>
                        <span class="item-value">
                            <el-input type="textarea" :rows="4" placeholder="请输入内容" v-model="ja.remark" maxlength="500"
                                      show-word-limit></el-input>
                        </span>
                    </div>
                </div>
                <div v-if="closeCaseType === 1">
                    <div class="line-item">
                        <span class="item-name"><i>*</i>原因：</span>
                        <span class="item-value">
                           <el-select v-model="otherSelect" @change="handleChange">
                               <el-option v-for="item in otherReasonData" :value="item.id" :label="item.name" :key="item.id" ></el-option>
                           </el-select>
                        </span>
                    </div>
                    <div class="line-item">
                        <span class="item-name">其他方式结案意见：</span>
                        <span class="item-value">
                            <el-input type="textarea" :rows="4" placeholder="请输入内容" v-model="ja.remark" maxlength="500"
                                      show-word-limit></el-input>
                        </span>
                    </div>
                </div>
            </div>
            <div class="dialog-footer">
                <el-button @click="dialogVisibleja = false">取 消</el-button>
                <el-button type="primary" @click="saveJa()" :disabled="dialogLoading">确 定</el-button>
            </div>
        </el-dialog>
        <!--案件销案-->
        <el-dialog
                title="案件销案"
                :visible.sync="dialogVisiblexa"
                :close-on-click-modal="false"
                width="600px">
            <!--案件驳回-->
            <div class="dialog-content" v-loading="dialogLoading">
                <div class="line-item">
                    <span class="item-name"><i>*</i>销案备注：</span>
                    <span class="item-value">
                        <el-input type="textarea" :rows="4" placeholder="请输入内容" v-model="cancellation.remark" maxlength="500"
                                  show-word-limit></el-input>
                    </span>
                </div>
            </div>
            <div class="dialog-footer">
                <el-button @click="dialogVisiblexa = false">取 消</el-button>
                <el-button type="primary" @click="saveXa()" :disabled="dialogLoading">确 定</el-button>
            </div>
        </el-dialog>
    </div>
    <!--案件详情——公共页面——结束-->
</template>

<script>
    import Cookies from 'js-cookie'
    import {getEventInfoByEventId, getEventLogList, saveEventPendEnd, updateEventSlow, updateEventDelay} from '@/api/case/caseQuery'
    import { getOrganization, handleshunt, eventThreeAccept, eventThreeCzry, eventThreeSend, eventThreeExamine,
        JLeventThreeExamine, handleover, updateDelFlagById, eventOversee, eventReject, caseCancellation, otherCloseData,
        otherCloseCase, pendReason, saveEventPend, checkDelay, insertEventDelay, checkHb, saveEventSlow, getQJData,
        etCaseCondition, getOtherInfo, editRegisterInfo, getCaseCondition, getAllBDJGBj, getOnlyBDJGBj, exportCasePDF} from '@/api/case/caseOperate'
    import { getcaseType, getcategoryName, getsubclassName } from '@/api/configure/configure'
    import Viewer from 'viewerjs'
    import 'viewerjs/dist/viewer.css'
    export default {
        name: 'noticeDetails',
        data () {
            return {
                // 页面加载
                loading: false,
                //案件id
                eventId:'',
                // 登录的用户信息
                createUser: JSON.parse(localStorage.getItem('userInfo')),
                // 表单数据
                form: {
                    //案件名称
                    eventName:'',
                    // 案件来源
                    eventSrcType: '',
                    eventSrcTypeName:'',
                    // 上报电话
                    eventReportPhone: '',
                    // 上报人
                    eventReportName: '',
                    // 上报人电话
                    eventCallPhone: '',
                    // 案件类别
                    eventType: '',
                    eventTypeName:'',
                    // 案件大类
                    eventTypeLv1: '',
                    eventTypeLv1Name:'',
                    // 案件小类
                    eventTypeLv2: '',
                    eventTypeLv2Name:'',
                    // 处置时限
                    time: '',
                    // 责任主体
                    deptParentCode: '',
                    deptParentName: '',
                    // 所属部门
                    deptCode: '',
                    deptName: '',
                    // 一级行业
                    industryTypeLv1: '',
                    industryTypeLv1Name: '',
                    // 二级行业
                    industryTypeLv2: '',
                    industryTypeLv2Name: '',
                    archivesTypeLeveThree:{
                        // 立案条件
                        starConditions: '',
                        // 是否延期
                        isYq: '',
                        // 是否缓办
                        isHb: '',
                        // 是否突发
                        isTf: '',
                        // 是否紧急
                        isJj: '',
                    },

                    // 发生位置
                    eventAddress: '',
                    // 发生位置X坐标
                    // 是否开放景区
                    isOpenScenic: '',
                    gdx: '',
                    // 发生位置Y坐标
                    gdy: '',
                    // 案件描述
                    eventDescribe: '',
                    // 案件级别（目前没有）
                    eventLevel: 0,
                },
                //案件日志数据
                eventLogList:[],
                //结束挂起弹出层
                dialogVisible:false,
                //弹出层宽度
                dialogWidth:'600px',
                //弹出层的title
                title:'',
                //待审批案件
                pendingApproval:{
                    //待审批详情页的按钮要根据案件类别出现
                    eventType:this.$route.query.eventType,
                    //审批意见
                    auditDetails:'',
                    //审批状态
                    auditStatus:''
                },
                // 弹出层加载
                dialogLoading: false,
                //办理的挂起原因数据
                pendReasonData:[],
                // 重新转办
                dialogVisiblecxzb:false,
                //*//////新的//////////////////////////*/
                //案件转办
                dialogVisiblezb:false,
                transfer:{
                    organizationData:[],//机构
                    organizationid:'',//机构编码
                    remark:'',//转办描述
                },
                //案件督办
                dialogVisibledb:false,
                eventOversee:{
                    contents:'',
                },
                //案件派遣
                dialogVisiblepq:false,
                dispatch:{
                    sendTargetId:'',
                    sendTargetIdData:[],
                    //已选派遣人员的信息
                    selectPhone:'',
                    selectPq:'',
                },
                //处置机构审核备注
                czjgremark:'',
                dialogVisibleczjg:false,
                //监理审核备注
                jlremark:'',
                dialogVisiblejl:false,
                //挂起申请
                dialogVisiblegq:false,
                blgq:{
                    pendReason:'',
                    pendRemark:'',
                    //挂起原因数据
                    pendReasonData:[],
                },
                //结束挂起备注
                dialogVisiblejsgq:false,
                remark:'',
                //缓办申请
                dialogVisiblehb:false,
                hbreason:'',
                // 查看图片弹出层
                viewImageDialog: false,
                // 上传的文件列表
                fileList: [],
                // 获取的图片数据
                imageData: [],
                // 单个图片查看地址
                dialogImageUrl: '',
                //案件驳回
                dialogVisiblebh:false,
                eventReject:{
                    remark:''
                },
                //延期申请
                dialogVisibleyq:false,
                yqreason:'',
                //案件回退
                dialogVisibleht:false,
                backoff:{
                    eventDescribe:'',//回退描述
                },
                // 结案方式
                dialogVisibleja:false,
                jaTitle:'案件结案',
                closeCaseType: 0, // 0——正常结案；1——其他方式结案
                // 其他方式结案下拉参数
                otherSelect: '',
                // 其他方式结案原因下拉数据
                otherReasonData: [],
                //结案
                ja:{
                    remark:''
                },
                // 案件销案
                dialogVisiblexa: false,
                // 销案备注
                cancellation: {
                    remark:''
                },
                url: process.env.VUE_APP_PROD_API,
                str:{},
                bigArr:{},
                smallArr:{},
                // 曲江边界数据
                qjBoundaryData: [],
                // 高德地图
                GDMap: null,

                // 编辑案件弹出层绑定参数
                editDialogVisible: false,
                // 编辑案件弹出层加载
                editDialogloading: false,
                // 编辑案件的form表单数据
                editForm: {
                    // 案件ID
                    eventId: '',
                    //案件名称
                    eventName:'',
                    // 案件类别
                    eventType: '',
                    // 案件大类
                    eventTypeLv1: '',
                    // 案件小类
                    eventTypeLv2: '',
                    // 立案条件
                    eventTypeLv3: '',
                    // 责任主体
                    deptParentCode: '',
                    deptParentName: '',
                    // 所属部门
                    deptCode: '',
                    deptName: '',
                    // 一级行业
                    industryTypeLv1: '',
                    industryTypeLv1Name: '',
                    // 二级行业
                    industryTypeLv2: '',
                    industryTypeLv2Name: '',
                    archivesTypeLeveThree:{
                        // 是否延期
                        isYq: '',
                        // 是否缓办
                        isHb: '',
                        // 是否突发
                        isTf: '',
                        // 是否紧急
                        isJj: '',
                    },
                    // 案件描述
                    eventDescribe: '',
                },
                // 案件类别下拉数据
                caseTypeData: [],
                // 案件大类下拉数据
                caseBigClassData: [],
                // 案件小类下拉数据
                caseSmallClassData: [],
                // 立案条件下拉数据
                caseConditionData: [],
                // 根据立案条件查询责任主体、部门、一级行业、二级行业等信息
                allOtherInfo: {},
                //查看地图弹出层
                dialogVisibleLookMap:false,
            }
        },
        created(){
            this.eventId = this.$route.query.eventId;
            // 获取曲江边界数据
            this.getQJData();
            //初始化数据
            this.getEventInfo();
            //获取案件日志
            this.getEventLogList();
            this.$nextTick(() => {
                //console.log(this.$route.query.eventId);
            })
        },
        computed:{
            timelineImages(){
                for(let i=0;i<this.eventLogList.length;i++){
                    if(this.eventLogList[i].images.length > 0){
                        return this.eventLogList[i].images;
                    }else{
                        return [];
                    }
                }
            },
            visitedViews() {
                return this.$store.state.tagsView.visitedViews
            },
        },
        methods:{
            //派遣人员radio事件
            radioChange(){
                for(let i=0;i<this.dispatch.sendTargetIdData.length;i++){
                    if(this.dispatch.sendTargetIdData[i].userId === this.dispatch.sendTargetId){
                        this.dispatch.selectPq = this.dispatch.sendTargetIdData[i].nickName;
                        this.dispatch.selectPhone = this.dispatch.sendTargetIdData[i].phonenumber;
                    }
                }
            },
            /**
             * Description:获取曲江边界数据
             * Author:ybt
             * Date:2020/11/5
             */
            getQJData(){
                getQJData({}).then((res) => {
                    this.qjBoundaryData = JSON.parse(res.msg);
                }).catch((error) => {
                    console.log(error, 'getQJData')
                })
            },
            /**
             * Description:销案
             * Author:cy
             * Date:2020/10/12
             */
            openXaDialog(){
                this.cancellation.remark = '';
                this.dialogVisiblexa = true;
            },
            saveXa(){
                if(this.cancellation.remark === ''){
                    this.$message.error('请输入销案备注');
                    this.dialogLoading = false;
                    return
                }
                this.$confirm(this.form.eventName , '确定是否销案该案件', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning',
                    center: true
                }).then(() => {
                    let options = {
                        eventId: this.eventId,
                        remark: this.cancellation.remark,
                    };
                    caseCancellation(options).then(() => {
                        this.dialogVisiblexa = false;
                        this.$message.success('案件销案成功');
                        //刷新详情标签
                        let viewsTabs=this.visitedViews;
                        for(let i=0;i<viewsTabs.length;i++){
                            if(viewsTabs[i].path == '/noticeDetails/index/'){
                                this.refreshSelectedTag(viewsTabs[i]);
                            }
                        }
                    }).catch((error)=>{
                        this.dialogLoading = false;
                        console.log(error, 'updateDelFlagById');
                    })
                }).catch(() => {
                    this.dialogLoading = false;
                    this.$message.info('已取消案件回退');
                });
            },
            /**
             * Description:结案
             * Author:cy
             * Date:2020/10/12
             */
            openJaDialog(other){
                this.dialogVisibleja = true;
                this.ja.remark = '';
                this.otherSelect = '';
                if (other === 'other') {
                    // 获取结案原因
                    otherCloseData().then((res) => {
                        this.otherReasonData = res.data;
                    }).catch((error) => {
                        console.log(error, 'otherCloseData');
                    });
                    this.title = '其他方式结案';
                    this.closeCaseType = 1;
                    this.otherSelect = '';
                } else {
                    this.title = '案件结案';
                    this.closeCaseType = 0;
                    this.ja.remark = '';
                }
            },
            //其他方式结案下拉选择出发
            handleChange(){
                this.otherReasonData.forEach(item => {
                    if (item.id === this.otherSelect) {
                        this.ja.remark = item.name
                    }
                })
            },
            saveJa(){
                this.$confirm(this.form.eventName , '确定是否对该案件进行结案', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning',
                    center: true
                }).then(() => {
                    this.loading = true;
                    let options = {
                        eventId:this.eventId,
                        remark:this.ja.remark
                    };
                    let url = '';
                    if (this.closeCaseType === 0) {
                        url = handleover;
                    } else if (this.closeCaseType === 1){
                        url = otherCloseCase;
                    }
                    url(options).then(
                        (res) => {
                            this.loading = false;
                            this.dialogVisibleja = false;
                            this.$message.success('案件结案成功');
                            //刷新详情标签
                            let viewsTabs=this.visitedViews;
                            for(let i=0;i<viewsTabs.length;i++){
                                if(viewsTabs[i].path == '/noticeDetails/index/'){
                                    this.refreshSelectedTag(viewsTabs[i]);
                                }
                            }
                        }
                    ).catch((error)=>{
                        this.loading = false;
                        console.log(error, 'handleover');
                    })
                }).catch(() => {
                    this.$message.info('已取消案件结案');
                });
            },
            /**
             * Description:重新转办
             * Author:cy
             * Date:2020/10/12
             */
            openCxzbDialog(){
                this.dialogVisiblecxzb = true;
                this.transfer.organizationid = '';
                this.transfer.remark = '';
                getOrganization({eventId:this.eventId}).then(
                    (res) => {
                        this.transfer.organizationData=res.data;
                    }
                ).catch((error) => {
                    console.log(error, 'getOrganization');
                });
            },
            //重新转办
            savecxzb(){
                if(this.transfer.organizationid === ''){
                    this.$message.error('请选择转办机构');
                    return
                }
                let _this = this;
                this.$confirm(_this.form.eventName , '确定是否转办', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning',
                    center: true
                }).then(() => {
                    this.loading = true;
                    let options = {
                        eventId:this.eventId,
                        remark: this.transfer.remark,
                        type: 1,
                        organizationid:this.transfer.organizationid,
                    };
                    handleshunt(options).then(
                        (res) => {
                            this.loading = false;
                            this.dialogVisiblecxzb = false;
                            this.$message.success('案件转办成功');
                            //刷新详情标签
                            let viewsTabs=this.visitedViews;
                            for(let i=0;i<viewsTabs.length;i++){
                                if(viewsTabs[i].path == '/noticeDetails/index/'){
                                    this.refreshSelectedTag(viewsTabs[i]);
                                }
                            }
                        }
                    ).catch((error)=>{
                        this.loading = false;
                        console.log(error, 'handleshunt');
                    })
                }).catch(() => {
                    this.$message.info('已取消案件转办');
                });

            },
            /**
             * Description:回退
             * Author:cy
             * Date:2020/10/12
             */
            openHtDialog(){
                this.dialogVisibleht = true;
                this.backoff.eventDescribe = ''
            },
            saveHt(){
                if(this.backoff.eventDescribe === ''){
                    this.$message.error('请输入回退描述');
                    return
                }
                let _this = this;
                this.$confirm(_this.form.eventName , '确定是否回退该案件', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning',
                    center: true
                }).then(() => {
                    this.loading = true;
                    let options = {
                        eventId:_this.eventId,
                        id: _this.$route.query.eventThreeID,
                        params:{
                            eventDescribe:_this.backoff.eventDescribe
                        }
                    };
                    updateDelFlagById(options).then(
                        (res) => {
                            this.loading = false;
                            this.dialogVisibleht = false;
                            this.$message.success('案件回退成功');
                            //刷新详情标签
                            let viewsTabs=this.visitedViews;
                            for(let i=0;i<viewsTabs.length;i++){
                                if(viewsTabs[i].path == '/noticeDetails/index/'){
                                    this.refreshSelectedTag(viewsTabs[i]);
                                }
                            }
                        }
                    ).catch((error)=>{
                        this.loading = false;
                        console.log(error, 'updateDelFlagById');
                    })
                }).catch(() => {
                    this.$message.info('已取消案件回退');
                });
            },
            /**
             * Description:缓办申请
             * Author:cy
             * Date:2020/10/12
             */
            openHbDiaolog(){
                checkHb({eventId: this.eventId}).then(
                    (res) => {
                        if(res.data.isTs == '1'){
                            this.$message.warning('领导交办或媒体曝光的重点问题不得申请缓办！');
                        }else if(res.data.isDelay == '1'){
                            this.$message.warning('该案件已经超时不得申请缓办！');
                        }else if(res.data.wsCount > 0){
                            this.$message.warning('该案件有未审批的缓办申请！');
                        }else if(res.data.tgCount >= 6){
                            this.$message.warning('该案件在本月已经申请缓办6次，不得再申请！');
                        }else{
                            this.dialogVisiblehb = true;
                            this.fileList = [];
                            this.hbreason = '';
                        }
                    }
                ).then((error) => {
                    console.log(error, 'checkHb');
                })
            },
            /**
             * Description:文件状态改变时的钩子
             * Author:ybt
             * Date:2020/9/21
             */
            uploadChange(res){
                this.fileList.push(res)
            },
            /**
             * Description:点击查看图片
             * Author:ybt
             * Date:2020/9/21
             */
            handlePictureCardPreview(file) {
                this.dialogImageUrl = file.url;
                this.viewImageDialog = true;
            },
            /**
             * Description:删除未上传图片
             * Author:ybt
             * Date:2020/9/21
             */
            handleRemove(file) {
                console.log(file);
                this.fileList.forEach((item, index) => {
                    if (item.uid === file.uid) {
                        this.fileList.splice(index, 1)
                    }
                })
            },
            //保存缓办申请
            saveHb(){
                if(this.hbreason== ''){
                    this.$message.error('请填写缓办原因');
                    return
                }
                this.$confirm(this.form.eventName , '确定是否要对该案件进行缓办', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning',
                    center: true
                }).then(() => {
                    this.loading = true;
                    let formDataCurrent = new FormData();
                    this.fileList.map(tt => {
                        formDataCurrent.append('file', tt.raw);
                    });
                    
                    formDataCurrent.append('eventId', this.eventId);
                    formDataCurrent.append('remark', this.hbreason);
                    saveEventSlow(formDataCurrent).then(
                        (res) => {
                            this.loading = false;
                            this.dialogVisiblehb = false;
                            this.$message.success('缓办申请成功');
                            //刷新详情标签
                            let viewsTabs=this.visitedViews;
                            for(let i=0;i<viewsTabs.length;i++){
                                if(viewsTabs[i].path == '/noticeDetails/index/'){
                                    this.refreshSelectedTag(viewsTabs[i]);
                                }
                            }
                        }
                    ).catch((error)=>{
                        this.loading = false;
                        console.log(error, 'updateEventSlow');
                    })
                }).catch(() => {
                    this.$message.info('已取消缓办申请');
                });
            },
            /**
             * Description:延期申请
             * Author:cy
             * Date:2020/10/12
             */
            openYqDialog(){
                checkDelay({eventId: this.eventId}).then(
                    (res) => {
                        if(res.data.isTs == '1'){
                            this.$message.warning('领导交办或媒体曝光的重点问题不得申请延期！');
                        }else if(res.data.isDelay == '1'){
                            this.$message.warning('该案件已经超时不得申请延期！');
                        }else if(res.data.wsCount > 0){
                            this.$message.warning('该案件有未审批的延期申请！');
                        }else if(res.data.tgCount >= 10){
                            this.$message.warning('该案件在本月已经申请延期十次，不得再申请！');
                        }else{
                            this.dialogVisibleyq = true;
                            this.yqreason= '';
                        }
                    }
                ).then((error) => {
                    console.log(error, 'checkDelay');
                })
            },
            saveyq(){
                if(this.yqreason== ''){
                    this.$message.error('请填写延期原因');
                    return
                }
                this.$confirm(this.form.eventName , '确定是否要对该案件进行延期', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning',
                    center: true
                }).then(() => {
                    this.loading = true;
                    let data = {
                        eventId:this.eventId,
                        reason:this.yqreason
                    }
                    insertEventDelay(data).then(
                        (res) => {
                            this.loading = false;
                            this.dialogVisibleyq = false;
                            this.$message.success('延期申请成功');
                            //刷新详情标签
                            let viewsTabs=this.visitedViews;
                            for(let i=0;i<viewsTabs.length;i++){
                                if(viewsTabs[i].path == '/noticeDetails/index/'){
                                    this.refreshSelectedTag(viewsTabs[i]);
                                }
                            }
                        }
                    ).catch((error)=>{
                        this.loading = false;
                        console.log(error, 'updateEventSlow');
                    })
                }).catch(() => {
                    this.$message.info('已取消延期申请');
                });
            },
            /**
             * Description:驳回
             * Author:cy
             * Date:2020/10/12
             */
            openBhDialog(){
                this.dialogVisiblebh = true;
                this.eventReject.remark = '';
            },
            saveBh(){
                if(this.eventReject.remark === ''){
                    this.$message.error('请输入备注');
                    return
                }
                this.$confirm(this.form.eventName , '确定是否对该案件进行驳回', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning',
                    center: true
                }).then(() => {
                    this.loading = true;
                    let options = {
                        eventId:this.eventId,
                        remark: this.eventReject.remark
                    };
                    eventReject(options).then(
                        (res) => {
                            this.loading = false;
                            this.dialogVisiblebh = false;
                            this.$message.success('案件驳回成功');
                            //刷新详情标签
                            let viewsTabs=this.visitedViews;
                            for(let i=0;i<viewsTabs.length;i++){
                                if(viewsTabs[i].path == '/noticeDetails/index/'){
                                    this.refreshSelectedTag(viewsTabs[i]);
                                }
                            }
                        }
                    ).catch((error)=>{
                        this.loading = false;
                        console.log(error, 'eventReject');
                    })
                }).catch(() => {
                    this.$message.info('已取消案件驳回');
                });
            },
            /**
             * Description:结束挂起
             * Author:cy
             * Date:2020/10/12
             */
            openJsgqDialog(){
                this.dialogVisiblejsgq = true;
                this.remark = '';
            },
            saveJsgq(){
                this.$confirm(this.form.eventName , '确定结束挂起', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning',
                    center: true
                }).then(() => {
                    this.loading = true;
                    let options = {
                        eventId:this.eventId,
                        remark: this.remark
                    };
                    saveEventPendEnd(options).then(
                        (res) => {
                            this.loading = false;
                            this.dialogVisiblejsgq = false;
                            this.$message.success('结束挂起成功');
                            //刷新详情标签
                            let viewsTabs=this.visitedViews;
                            for(let i=0;i<viewsTabs.length;i++){
                                if(viewsTabs[i].path == '/noticeDetails/index/'){
                                    this.refreshSelectedTag(viewsTabs[i]);
                                }
                            }
                        }
                    ).catch((error)=>{
                        this.loading = false;
                        console.log(error, 'saveEventPendEnd');
                    })
                }).catch(() => {
                    this.$message.info('已取消结束挂起');
                });
            },
            /**
             * Description:挂起申请
             * Author:cy
             * Date:2020/10/12
             */
            openGqdialog(){
                this.dialogVisiblegq = true;
                this.blgq.pendReason='';
                this.blgq.pendRemark='';
                pendReason().then(
                    (res) => {
                        this.blgq.pendReasonData = res.data;
                    }
                ).catch((error) => {
                    console.log(error, 'pendReason');
                })
            },
            saveGq(){
                if(this.blgq.pendReason === ''){
                    this.$message.error('请选择挂起原因');
                    return
                }
                this.$confirm(this.form.eventName , '确定是否对该案件进行挂起申请', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning',
                    center: true
                }).then(() => {
                    this.loading = true;
                    let data = {
                        eventId: this.eventId,
                        pendReason: this.blgq.pendReason,
                        pendRemark: this.blgq.pendRemark
                    };
                    saveEventPend(data).then(
                        (res) => {
                            this.dialogVisiblegq = false;
                            this.$message.success('案件挂起申请成功');
                            //刷新详情标签
                            let viewsTabs=this.visitedViews;
                            for(let i=0;i<viewsTabs.length;i++){
                                if(viewsTabs[i].path == '/noticeDetails/index/'){
                                    this.refreshSelectedTag(viewsTabs[i]);
                                }
                            }
                        }
                    ).catch((error)=>{
                        this.loading = false;
                        console.log(error, 'saveEventPend');
                    })
                }).catch(() => {
                    this.$message.info('已取消案件挂起申请');
                });
            },
            /**
             * Description:处置机构审核
             * Author:cy
             * Date:2020/10/12
             */
            openczjgShDialog(){
                this.dialogVisibleczjg = true;
                this.czjgremark = '';
            },
            saveCzjgSh(){
                this.$confirm(this.form.eventName , '确定是否对该案件进行审核', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning',
                    center: true
                }).then(() => {
                    this.loading = true;
                    let options = {
                        eventId:this.eventId,
                        remark:this.czjgremark
                    };
                    eventThreeExamine(options).then(
                        (res) => {
                            this.loading = false;
                            this.dialogVisibleczjg = false;
                            this.$message.success('案件审核成功');
                            //刷新详情标签
                            let viewsTabs=this.visitedViews;
                            for(let i=0;i<viewsTabs.length;i++){
                                if(viewsTabs[i].path == '/noticeDetails/index/'){
                                    this.refreshSelectedTag(viewsTabs[i]);
                                }
                            }
                        }
                    ).catch((error)=>{
                        this.loading = false;
                        console.log(error, 'eventThreeExamine');
                    })
                }).catch(() => {
                    this.$message.info('已取消案件审核');
                });
            },
            /**
             * Description:监理审核
             * Author:cy
             * Date:2020/10/12
             */
            opencjlShDialog(){
                this.dialogVisiblejl = true;
                this.jlremark = '';
            },
            saveJlSh(){
                this.$confirm(this.form.eventName , '确定是否对该案件进行审核', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning',
                    center: true
                }).then(() => {
                    this.loading = true;
                    let options = {
                        eventId:this.eventId,
                        remark:this.jlremark
                    };
                    JLeventThreeExamine(options).then(
                        (res) => {
                            this.loading = false;
                            this.dialogVisiblejl = false;
                            this.$message.success('案件审核成功');
                            //刷新详情标签
                            let viewsTabs=this.visitedViews;
                            for(let i=0;i<viewsTabs.length;i++){
                                if(viewsTabs[i].path == '/noticeDetails/index/'){
                                    this.refreshSelectedTag(viewsTabs[i]);
                                }
                            }
                        }
                    ).catch((error)=>{
                        this.loading = false;
                        console.log(error, 'JLeventThreeExamine');
                    })
                }).catch(() => {
                    this.$message.info('已取消案件审核');
                });
            },
            /**
             * Description:派遣
             * Author:cy
             * Date:2020/10/12
             */
            openPqdialog(){
                this.dialogVisiblepq = true;
                this.dispatch.sendTargetId = '';
                let data = {
                    eventId:this.publicData.eventId,
                    organizationCode:this.form.eventThree.organizationid
                };
                eventThreeCzry(data).then(
                    (res) => {
                        this.dispatch.sendTargetIdData = res.data;
                    }
                ).catch((error) => {
                    console.log(error, 'eventThreeCzry');
                })
            },
            savePq(){
                if(this.dispatch.sendTargetId == ''){
                    this.$message.error('请选择派遣机构');
                    return
                }
                this.$confirm(this.form.eventName , '确定是否派遣', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning',
                    center: true
                }).then(() => {
                    this.loading = true;
                    let options = {
                        eventId:this.eventId,
                        sendTargetId:this.dispatch.sendTargetId
                    };
                    eventThreeSend(options).then(
                        (res) => {
                            this.loading = false;
                            this.dialogVisiblepq = false;
                            this.$message.success('案件派遣成功');
                            //刷新详情标签
                            let viewsTabs=this.visitedViews;
                            for(let i=0;i<viewsTabs.length;i++){
                                if(viewsTabs[i].path == '/noticeDetails/index/'){
                                    this.refreshSelectedTag(viewsTabs[i]);
                                }
                            }
                        }
                    ).catch((error)=>{
                        this.loading = false;
                        console.log(error, 'eventThreeSend');
                    })
                }).catch(() => {
                    this.$message.info('已取消案件派遣');
                });
            },
            /**
             * Description:受理
             * Author:cy
             * Date:2020/10/12
             */
            saveSl(){
                this.$confirm(this.form.eventName , '确定是否受理该案件', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning',
                    center: true
                }).then(() => {
                    this.loading = true;
                    let options = {
                        eventId:this.eventId,
                        id:this.form.eventThree.id
                    };
                    eventThreeAccept(options).then(
                        (res) => {
                            this.loading = false;
                            this.dialogVisible = false;
                            this.$message.success('案件受理成功');
                            //刷新详情标签
                            let viewsTabs=this.visitedViews;
                            for(let i=0;i<viewsTabs.length;i++){
                                if(viewsTabs[i].path == '/noticeDetails/index/'){
                                    this.refreshSelectedTag(viewsTabs[i]);
                                }
                            }
                        }
                    ).catch((error)=>{
                        this.loading = false;
                        console.log(error, 'eventThreeAccept');
                    })
                }).catch(() => {
                    this.$message.info('已取消案件受理');
                    this.loading = false;
                });
            },
            /**
             * Description:
             * Author:cy
             * Date:2020/10/12
             */
            openDbdialog(){
              this.dialogVisibledb = true;
              this.eventOversee.contents='';
            },
            saveDb(){
                if(this.eventOversee.contents === ''){
                    this.$message.error('请输入督办意见');
                    return
                }
                this.$confirm(this.form.eventName , '确定是否对该案件进行督办', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning',
                    center: true
                }).then(() => {
                    this.loading = true;
                    let options = {
                        eventId:this.eventId,
                        contents: this.eventOversee.contents
                    };
                    eventOversee(options).then(
                        (res) => {
                            this.loading = false;
                            this.dialogVisibledb = false;
                            this.$message.success('案件督办成功');
                            //刷新详情标签
                            let viewsTabs=this.visitedViews;
                            for(let i=0;i<viewsTabs.length;i++){
                                if(viewsTabs[i].path == '/noticeDetails/index/'){
                                    this.refreshSelectedTag(viewsTabs[i]);
                                }
                            }
                        }
                    ).catch((error)=>{
                        this.loading = false;
                        console.log(error, 'eventOversee');
                    })
                }).catch(() => {
                    this.$message.info('已取消案件督办');
                });
            },
            /**
             * Description:转办
             * Author:cy
             * Date:2020/10/12
             */
            openZbdialog(){
                this.dialogVisiblezb = true;
                this.transfer.organizationid='';
                this.transfer.remark='';
                getOrganization({eventId:this.$route.query.eventId}).then(
                    (res) => {
                        this.transfer.organizationData=res.data;
                    }
                ).catch((error) => {
                    console.log(error, 'getOrganization');
                });
            },
            saveZB(){
                if(this.transfer.organizationid == ''){
                    this.$message.error('请选择转办机构');
                    return
                }
                this.$confirm(this.form.eventName , '确定是否转办', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning',
                    center: true
                }).then(() => {
                    this.loading = true;
                    let options = {
                        eventId:this.eventId,
                        remark: this.transfer.remark,
                        type: 1,
                        organizationid:this.transfer.organizationid,
                    };
                    handleshunt(options).then(
                        (res) => {
                            this.loading = false;
                            this.dialogVisible = false;
                            this.$message.success('案件转办成功');
                            //刷新详情标签
                            let viewsTabs=this.visitedViews;
                            for(let i=0;i<viewsTabs.length;i++){
                                if(viewsTabs[i].path == '/noticeDetails/index/'){
                                    this.refreshSelectedTag(viewsTabs[i]);
                                }
                            }
                        }
                    ).catch((error)=>{
                        this.loading = false;
                        console.log(error, 'handleshunt');
                    })
                }).catch(() => {
                    this.$message.info('已取消案件转办');
                });
            },
            /**
             * Description:获取案件详情
             * Author:cy
             * Date:2020/9/24
             */
            getEventInfo(){
                this.loading = true;
                let url = null;
                //点击全部案件的详情进入
                if(this.form.type == 0){
                    url = getEventInfoByEventId;
                }
                getEventInfoByEventId({eventId: this.eventId}).then(
                    (res) => {
                        this.form = res.data;
                        this.loading = false;
                        this.$nextTick(() => {
                            // 初始化地图
                            this.initMap('myMap');
                        });
                    }
                ).catch((error) => {
                    console.log(error, 'getEventInfoByEventId');
                })
            },
            /**
             * Description:获取案件日志图片
             * Author:cy
             * Date:2020/9/24
             */
            getEventLogList(){
                this.loading = true;
                let urllog = null;
                //点击全部案件的详情进入
                if(this.form.type == 0){
                    urllog = getEventLogList;
                }
                getEventLogList({eventId: this.eventId}).then(
                    (res) => {
                        this.eventLogList = res.data;
                        let _this =  this;
                            let logData=this.eventLogList;
                            let imgurl = this.url;
                            for(let i=0;i<logData.length;i++){
                                $('#timeline_images'+i).html('');
                                var imagesarr=JSON.parse(logData[i].images);
                                _this.str['arr' + i] = [];
                                _this.smallArr['arr'+i] = [];
                                _this.bigArr['arr'+i] = [];
                                if(imagesarr.length > 0){
                                    for(let j=0;j<imagesarr.length;j++){
                                        if(imagesarr[j].size_type == 0){
                                            _this.smallArr['arr' + i].push(imagesarr[j].path);
                                        }
                                        if(imagesarr[j].size_type == 1){
                                            _this.bigArr['arr' + i].push(imagesarr[j].path);
                                        }
                                    }
                                }
                            }
                        this.loading = false;
                    }
                ).catch((error) => {
                    console.log(error, 'getEventLogList');
                })
            },
            /**
             * Description:初始化地图
             * Author:ybt
             * Date:2020/9/23
             */
            initMap(){
                // 高德地图初始化
                this.GDMap = new AMap.Map('myMap', {
                    zoom: 17,
                    viewMode: '3D',
                    center: [this.form.gdx, this.form.gdy],
                    resizeEnable: true,
                });
                if (this.qjBoundaryData.type === 'Polygon') { // 单面
                    this.AcquisitionLine(this.qjBoundaryData.coordinates)
                } else if (this.qjBoundaryData.type === 'MultiPolygon') { // 多面
                    this.qjBoundaryData.coordinates.forEach(value => {
                        this.AcquisitionLine(value);
                    })
                } else if (this.qjBoundaryData.type === 'LineString') { // 单线
                    this.AcquisitionLine(this.qjBoundaryData.coordinates[0])
                } else if (this.qjBoundaryData.type === 'MultiLineString') { // 多线
                    this.qjBoundaryData.coordinates.forEach(value => {
                        this.AcquisitionLine(value);
                    })
                }
                this.GDMap.setFitView();// 执行定位

                // 以下为标记点位
                // 创建一个 Icon
                let startIcon = new AMap.Icon({
                    size: new AMap.Size(40, 40),
                    image: 'https://webapi.amap.com/theme/v1.3/markers/n/mark_bs.png',
                    imageSize: new AMap.Size(20, 30),
                });
                // 添加点标记
                this.marker = new AMap.Marker({
                    icon: startIcon, // 点标记的图标
                    position: [this.form.gdx, this.form.gdy], // 点标记的坐标
                    clickable: true, // 点标记是否可以点击
                });
                this.marker.setMap(this.GDMap); // 将点标记添加到地图

                this.$nextTick( () => {
                    // 注：this.createUser.userType：0——普通用户；1——机构用户
                    // 0101 —— 转办   0201——受理   0202——派遣
                    if (!this.createUser.organizationId && this.publicData.eventDealStatus === '0101') {
                        this.getAllBDJGBj();
                    } else if (this.createUser.organizationId && (this.publicData.eventDealStatus === '0201' || this.publicData.eventDealStatus === '0202')) {
                        this.getOnlyBDJGBj();
                    }
                })
            },
            /**
             * Description:通过二级行业类别获取所有标段机构公司边界
             * Author:ybt
             * Date:2021/1/25
             */
            getAllBDJGBj(){
                getAllBDJGBj({id: this.form.industryTypeLv2}).then( (res) => {
                    res.data.forEach( item => {
                        if (item.st_asgeojson && item.st_asgeojson != '') {
                            let jsonData = JSON.parse(item.st_asgeojson);
                            if (jsonData && jsonData.type === 'MultiPolygon') {
                                jsonData.coordinates.forEach( value => {
                                    this.AcquisitionLine(value, item.color);
                                })
                            } else if (jsonData && jsonData.type === 'Polygon') {
                                this.AcquisitionLine(jsonData.coordinates, item.color);
                            }
                        }
                    })
                }).catch((error) => {
                    console.log(error, 'getAllBDJGBj');
                })
            },
            /**
             * Description:通过标段机构编码和行业类别查找边界
             * Author:ybt
             * Date:2021/1/25
             */
            getOnlyBDJGBj(){
                getOnlyBDJGBj({code: this.createUser.organizationId, industryTypeLv2: this.form.industryTypeLv2}).then( (res) => {
                    res.data.forEach( item => {
                        if (item.st_asgeojson && item.st_asgeojson != '') {
                            let jsonData = JSON.parse(item.st_asgeojson);
                            if (jsonData && jsonData.type === 'MultiPolygon') {
                                jsonData.coordinates.forEach( value => {
                                    this.AcquisitionLine(value, item.color);
                                })
                            } else if (jsonData && jsonData.type === 'Polygon') {
                                this.AcquisitionLine(jsonData.coordinates, item.color);
                            }
                        }
                    })
                }).catch((error) => {
                    console.log(error, 'getOnlyBDJGBj');
                })
            },
            /**
             * Description:画曲江边界（画面）
             * Author:ybt
             * Date:2020/7/29
             */
            AcquisitionLine(item,color) {
                if (color) {
                    let Polygon = new AMap.Polygon({
                        map: this.GDMap,
                        path: item,
                        strokeColor: '#00b0ff',
                        strokeOpacity: 0.6,
                        strokeWeight: 1,
                        fillColor: color,
                        fillOpacity: 0.6,
                        zIndex: 50,
                        bubble: true,
                    });
                    this.GDMap.setFitView(Polygon);// 执行定位
                } else {
                    // 曲江边界
                    let Polygon = new AMap.Polygon({
                        map: this.GDMap,
                        path: item,
                        strokeColor: '#ff0000',
                        strokeOpacity: 0.6,
                        strokeWeight: 2,
                        strokeStyle: "dashed",
                        fillColor: '',
                        fillOpacity: 0.6,
                        zIndex: 50,
                        bubble: true,
                    });
                }
            },
            //关闭当前标签
            closeSelectedTag(view) {
                this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
                    if (this.isActive(view)) {
                        this.toLastView(visitedViews, view)
                    }
                })
            },
            refreshSelectedTag(view) {
                this.$store.dispatch('tagsView/delCachedView', view).then(() => {
                    const { fullPath } = view;
                    this.$nextTick(() => {
                        this.$router.replace({
                            path: '/redirect' + fullPath
                        })
                    })
                })
            },
            isActive(route) {
                return route.path === this.$route.path
            },
            toLastView(visitedViews, view) {
                const latestView = visitedViews.slice(-1)[0];
                if (latestView) {
                    this.$router.push(latestView.fullPath)
                } else {
                    if (view.name === 'Dashboard') {
                        this.$router.replace({ path: '/redirect' + view.fullPath })
                    } else {
                        this.$router.push('/')
                    }
                }
            },
            /**
             * Description:查看街景
             * Author:ybt
             * Date:2020/10/29
             */
            toStreetView(){
                const { href } = this.$router.resolve({
                    path: '/streetView/index',
                    name: 'streetView',
                    query: {
                        x: this.form.bdx,
                        y: this.form.bdy,
                    }
                });
                window.open(href, '_blank');
            },
            /**
             * Description:编辑案件
             * Author:ybt
             * Date:2020/11/6
             */
            editCase(type){
                if (type === 0) {
                    this.editForm = $.extend(true, {}, this.form);
                    // 获取案件类别下拉数据
                    this.getCaseType();
                    // 获取案件大类
                    this.getCaseBigClass();
                    // 获取案件小类
                    this.getCaseSmallClass();
                    // 获取立案条件
                    this.getCaseCondition();
                    this.editDialogVisible = true;
                } else if (type === 1) {
                    this.editDialogloading = true;
                    if (this.editForm.eventType === '') {
                        this.$message.error('请选择案件类别');
                        this.editDialogloading = false;
                        return
                    } else if (this.editForm.eventTypeLv1 === '') {
                        this.$message.error('请选择案件大类');
                        this.editDialogloading = false;
                        return
                    } else if (this.editForm.eventTypeLv2 === '') {
                        this.$message.error('请选择案件小类');
                        this.editDialogloading = false;
                        return
                    } else if (this.editForm.eventTypeLv3 === '') {
                        this.$message.error('请选择立案条件');
                        this.editDialogloading = false;
                        return
                    } else if (this.editForm.eventDescribe === '') {
                        this.$message.error('请输入案件描述');
                        this.editDialogloading = false;
                        return
                    }
                    editRegisterInfo(this.editForm).then(() => {
                        this.$message.success('修改成功')
                        this.editDialogVisible = false;
                        this.editDialogloading = false;
                        // 获取案件详情数据
                        this.getEventInfo();
                    }).catch((error) => {
                        this.editDialogloading = false;
                        console.log(error, 'submitRegisterInfo')
                    })
                }
            },
            /**
             * Description:获取案件类别数据
             * Author:ybt
             * Date:2020/9/23
             */
            getCaseType(){
                getcaseType({}).then((res) => {
                    this.caseTypeData = res.data;
                }).catch((error) => {
                    console.log(error, 'getcaseType')
                })
            },
            /**
             * Description:获取案件大类
             * Author:ybt
             * Date:2020/9/23
             */
            getCaseBigClass(bool){
                this.editDialogloading = true;
                if (bool) {
                    this.editForm.eventTypeLv1 = '';
                    this.editForm.eventTypeLv2 = '';
                    this.editForm.eventTypeLv3 = '';
                    this.editForm.deptParentCode = '';
                    this.editForm.deptParentName = '';
                    this.editForm.deptCode = '';
                    this.editForm.deptName = '';
                    this.editForm.industryTypeLv1 = '';
                    this.editForm.industryTypeLv1Name = '';
                    this.editForm.industryTypeLv2 = '';
                    this.editForm.industryTypeLv2Name = '';
                    this.editForm.isYq = '';
                    this.editForm.isHb = '';
                    this.editForm.isTf = '';
                    this.editForm.isJj = '';
                }
                getcategoryName({type: this.editForm.eventType}).then((res) => {
                    this.caseBigClassData = res.data;
                    this.editDialogloading = false;
                }).catch((error) => {
                    this.editDialogloading = false;
                    console.log(error, 'getcategoryName')
                })
            },
            /**
             * Description:获取案件小类
             * Author:ybt
             * Date:2020/9/23
             */
            getCaseSmallClass(bool){
                this.editDialogloading = true;
                if (bool) {
                    this.editForm.eventTypeLv2 = '';
                    this.editForm.eventTypeLv3 = '';
                    this.editForm.deptParentCode = '';
                    this.editForm.deptParentName = '';
                    this.editForm.deptCode = '';
                    this.editForm.deptName = '';
                    this.editForm.industryTypeLv1 = '';
                    this.editForm.industryTypeLv1Name = '';
                    this.editForm.industryTypeLv2 = '';
                    this.editForm.industryTypeLv2Name = '';
                    this.editForm.isYq = '';
                    this.editForm.isHb = '';
                    this.editForm.isTf = '';
                    this.editForm.isJj = '';
                }
                getsubclassName({ parentId: this.editForm.eventTypeLv1}).then((res) => {
                    this.caseSmallClassData = res.data;
                    this.editDialogloading = false;
                }).catch((error) => {
                    this.editDialogloading = false;
                    console.log(error, 'getsubclassName')
                })
            },
            /**
             * Description:获取立案条件下拉数据
             * Author:ybt
             * Date:2020/9/23
             */
            getCaseCondition(bool){
                this.editDialogloading = true;
                if (bool) {
                    this.editForm.eventTypeLv3 = '';
                    this.editForm.deptParentCode = '';
                    this.editForm.deptParentName = '';
                    this.editForm.deptCode = '';
                    this.editForm.deptName = '';
                    this.editForm.industryTypeLv1 = '';
                    this.editForm.industryTypeLv1Name = '';
                    this.editForm.industryTypeLv2 = '';
                    this.editForm.industryTypeLv2Name = '';
                    this.editForm.isYq = '';
                    this.editForm.isHb = '';
                    this.editForm.isTf = '';
                    this.editForm.isJj = '';
                }
                getCaseCondition({id: this.editForm.eventTypeLv2}).then((res) => {
                    this.caseConditionData = res.data;
                    this.editDialogloading = false;
                }).catch((error) => {
                    this.editDialogloading = false;
                    console.log(error, 'getCaseCondition')
                })
            },
            /**
             * Description:根据立案条件查询责任主体、部门、一级行业、二级行业等信息
             * Author:ybt
             * Date:2020/9/23
             */
            getOtherInfo(){
                this.editForm.deptParentCode = '';
                this.editForm.deptParentName = '';
                this.editForm.deptCode = '';
                this.editForm.deptName = '';
                this.editForm.industryTypeLv1 = '';
                this.editForm.industryTypeLv1Name = '';
                this.editForm.industryTypeLv2 = '';
                this.editForm.industryTypeLv2Name = '';
                this.editForm.isYq = '';
                this.editForm.isHb = '';
                this.editForm.isTf = '';
                this.editForm.isJj = '';
                getOtherInfo({id: this.editForm.eventTypeLv3}).then((res) => {
                    this.allOtherInfo = res.data;
                    // 责任主体
                    this.editForm.deptParentCode = this.allOtherInfo.parentDeptCode;
                    this.editForm.deptParentName = this.allOtherInfo.parentDeptName;
                    // 所属部门
                    this.editForm.deptCode = this.allOtherInfo.deptCode;
                    this.editForm.deptName = this.allOtherInfo.deptName;
                    // 一级行业
                    this.editForm.industryTypeLv1 = this.allOtherInfo.industryTypeLv1;
                    this.editForm.industryTypeLv1Name = this.allOtherInfo.industryTypeLv1Name;
                    // 二级行业
                    this.editForm.industryTypeLv2 = this.allOtherInfo.industryTypeLv2;
                    this.editForm.industryTypeLv2Name = this.allOtherInfo.industryTypeLv2Name;
                    // 是否延期
                    this.editForm.isYq = this.allOtherInfo.isYq;
                    // 是否缓办
                    this.editForm.isHb = this.allOtherInfo.isHb;
                    // 是否突发
                    this.editForm.isTf = this.allOtherInfo.isTf;
                    // 是否紧急
                    this.editForm.isJj = this.allOtherInfo.isJj;
                }).catch((error) => {
                    console.log(error, 'getOtherInfo')
                })
            },
            /**
             * Description:导出案件PDF
             * Author:ybt
             * Date:2021/2/1
             */
            exportCasePDF(){
                this.loading = true;
                exportCasePDF({eventIds:[this.publicData.eventId],size:'A4',delay:'2000'}).then((res) => {
                    this.download(res.msg);
                    this.loading = false;
                }).catch((error) => {
                    this.loading = false;
                    console.log(error, 'exportCasePDF')
                })
            },
        },
    }
</script>

<style lang="scss">
    .paiqian-dialog {
        .paiqian {
            .el-radio {
                .el-radio__label {
                    span {
                        &:nth-of-type(1) {
                            width: 1.5625rem;
                            display: inline-block;
                        }
                    }
                }
            }

            .selectPerson {
                width: 5rem;
                height: 0.9375rem;
                background: #eeeeee;
                border-radius: 0.25rem;
                margin: 0 auto;
                display: flex;
                justify-content: center;
                flex-wrap: wrap;
                align-content: center;

                .InspectorMes {
                    display: flex;
                    align-items: baseline;

                    img {
                        width: 0.25rem;
                        height: 0.275rem;
                        margin-right: 0.125rem;
                    }

                    .name {
                        font-size: 0.25rem;
                        color: #2b7caa;
                    }

                    .identity {
                        font-size: 0.15rem;
                        color: #8a8a8a;
                    }

                    span {
                        display: inline-block;
                        margin-right: 0.125rem;
                    }

                    .phone {
                        font-size: 0.175rem;
                        color: #8a8a8a;
                    }

                    .break {
                        display: inline-block;
                        margin: 0 0.125rem;
                        width: 0.1875rem;
                    }
                }

                .times {
                    width: 4.4rem;
                    font-size: 0.175rem;
                    color: #72aacb;
                    text-align: center;
                    border-top: 0.0125rem solid #8a8a8a;
                    margin-top: 0.0625rem;
                    padding-top: 0.0625rem;
                }
            }

            .paiqianTop {
                background: #EEEEEE;
                border-radius: 0.125rem;
                width: 80%;
                margin: 0 auto;
                margin-top: -10px;
                display: flex;
                flex-wrap: wrap;
                justify-content: center;
                padding: 0.1875rem 0 0.0625rem;

                .p1 {
                    font-size: 0.275rem;
                    color: #5c9cc1;
                    width: 100%;
                    margin: 0;
                    text-align: center;
                }

                .p2 {
                    font-size: 0.175rem;
                    color: #989696;
                    width: 100%;
                    margin: 0;
                    text-align: center;
                    margin-top: 0.1rem;
                    margin-bottom: 0.0625rem;
                }

                img {
                    width: 0.325rem;
                }
            }

            .Inspectors {
                position: relative;
                height: 2.75rem;
                border-top: 0.0125rem solid #c7c7c7;
                margin-top: 0.2875rem;
                border-bottom: 0.0125rem solid #c7c7c7;

                .tips {
                    width: 1.375rem;
                    display: flex;
                    justify-content: center;
                    background: #fff;
                    position: absolute;
                    top: -0.1875rem;
                    left: 0;
                    right: 0;
                    margin: auto;
                    color: #fff;

                    span {
                        display: inline-block;
                        padding: 0.075rem 0.275rem;
                        margin: 0 auto;
                        width: 1.25rem;
                        background: #72aacb;
                        border-radius: 0.625rem;
                    }
                }

                .xjyDiv {
                    height: 2.5rem;
                    overflow-y: auto;
                    margin-top: 0.1875rem;

                    .dinp1 {
                        position: relative;
                        overflow: hidden;
                        height: 0.5rem;
                        display: flex;
                        align-items: center;
                        margin: 0;
                        margin-top: 0.1rem;
                        margin-bottom: 0.1rem;
                        font-size: 0.1875rem;

                        &:hover {
                            height: 0.5rem;
                            background: #f1f1f1;
                            color: #438eb9;
                        }

                        .el-radio__label {
                            font-size: 0.1875rem;
                        }

                        .el-radio__inner {
                            width: 0.225rem;
                            height: 0.225rem;

                        }

                        .el-radio__input.is-checked .el-radio__inner {
                            border-color: #72aacb;
                            background: #72aacb;
                        }

                        .el-radio__input.is-checked + .el-radio__label {
                            color: #72aacb;
                        }
                    }
                }
            }
        }
    }
    .notice-details{
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: row;
        overflow: hidden;
        padding: 0.1875rem;
        .left-info{
            display: flex;
            flex-direction: column;
            width: 50%;
            background-color: #FFFFFF;
            border: 0.0125rem solid #A40000;
            overflow: hidden;
            .title-name{
                height: 0.4375rem;
                line-height: 0.4375rem;
                background: #A40000;
                text-align: center;
                color: #fff;
                font-size: 0.225rem;
                margin: 0 !important;
            }
            .info-content{
                display: flex;
                flex-direction: column;
                overflow: auto;
                flex:1;
                .top-box,.bottom-box{
                    display: flex;
                    flex-direction: row;
                    flex-wrap: wrap;
                    padding-right: 0.25rem;
                }
                .bottom-box{
                    flex-direction: column;
                    flex:1;
                    .block-box{
                        width:100%;
                        display: flex;
                    }
                }
                .top-box{
                    margin: 0.125rem 0;
                }
                .line-item{
                    display: flex;
                    width: 100%;
                    margin-bottom: 0.125rem;
                }
                .block-item{
                    display: flex;
                    width: 50%;
                    margin-bottom: 0.125rem;
                }
                .item-name{
                    width: 1.5rem;
                    text-align: right;
                    padding-right: 0.125rem;
                    line-height: 0.425rem;
                    font-size: 0.175rem;
                    cursor: default;
                }
                .item-value{
                    flex: 1;
                    .el-input input{
                        height: 0.425rem;
                        line-height: 0.425rem;
                    }
                    .el-select{
                        width: 100%;
                    }
                    .desc-textarea.el-textarea.is-disabled{
                        .el-textarea__inner{
                            height:100%;
                        }
                    }
                }
                .map-box{
                    width: 100%;
                    height: 3.75rem;
                    min-height: 3.75rem;
                    border-top: 0.0125rem solid #ddd;
                    padding: 0.125rem;
                    #myMap{
                        width: 100%;
                        height: 100%;
                    }
                }
            }
            .foot-btn{
                border-top: 0.0125rem solid #ddd;
                padding: 0 0.25rem 0.125rem;
                text-align: right;
                div.btns{
                    display: inline-block;
                    .el-button {
                        margin-left: 0.125rem;
                    }
                }
                .el-button{
                    margin-top:0.125rem;
                }
            }
        }
        .right-process{
            width: 50%;
            background-color: #FFFFFF;
            border: 0.0125rem solid #A40000;
            overflow: auto;
            padding: 0.1875rem;
            .el-timeline{
                padding: 0;
                .el-card__body{
                    display:flex;
                    justify-content: space-between;
                    .timeline_images{
                        display:flex;
                        justify-content: space-between;
                        align-items: center;
                        padding-left:0.125rem;
                        .images_item{
                            width:0.9375rem;
                            height:1.125rem;
                            padding: 0.025rem;
                            border: 0.0125rem solid #ccc;
                            margin-left: 0.1875rem;
                            list-style: none;
                            img{
                                display: inline-block;
                                width:100%;
                                height:100%;
                                cursor: pointer;
                            }
                        }
                    }
                }
                #title0021{
                    .el-timeline-item__timestamp{
                        color:red;
                    }
                }
            }
        }
        .bigImg{
            .el-dialog__body{
                display: flex;
                align-items: center;
                justify-content: center;
                img{
                    width: auto !important;
                    height: auto;
                    max-width: 100%;
                    max-height: 100%;
                }
            }
        }
        .el-dialog{
            display: flex;
            flex-direction: column;
            margin:0 !important;
            position:absolute;
            top:50% !important;
            left:50%;
            transform:translate(-50%,-50%);
            /*height:600px;*/
            /*max-height:calc(100% - 30px);*/
            /*max-width:calc(100% - 30px);*/
            /*width: 100%;
            height: 100%;*/
            .dialog-content{
                display: flex;
                flex-wrap: wrap;
                padding: 0 0.375rem 0.25rem 0.25rem;
                &>div{
                    width: 100%;
                }
                .itemABC{
                    width:100%;
                    .item-value{
                        display: flex;
                        justify-content: space-between;
                    }
                }
                .line-item{
                    display: flex;
                    flex-direction: row;
                    margin-bottom: 0.1875rem;
                    width: 100%;
                    .item-name{
                        width: 1.125rem;
                        text-align: right;
                        line-height: 0.425rem;
                        padding-right: 0.125rem;
                        i{
                            color: #f00;
                            padding-right: 0.0375rem;
                        }
                    }
                    .item-value{
                        flex: 1;
                        .el-input,.el-select{
                            width: 100%;
                            height: 0.425rem;
                            line-height: 0.425rem;
                        }
                    }
                    .depart-industry{
                        max-height: 3.75rem;
                        overflow-y: auto;
                    }
                }
            }
            .dialog-footer{
                text-align: center;
            }
        }
        .upload-image{
            .dialog-content{
                padding: 0 0 0.125rem 0.375rem;
                overflow: auto;
                &>div{
                    max-height: 5.8375rem;
                }
                .el-upload-dragger{
                    width: 1.825rem !important;
                    height: 1.825rem !important;
                }
            }
            .dialog-footer{
                text-align: center;
            }
        }
    }
    .el-dialog{
        .line-item{
            display: flex;
            width: 100%;
            margin-bottom: 0.125rem;
        }
        .block-item{
            display: flex;
            width: 50%;
            margin-bottom: 0.125rem;
        }
        .item-name{
            width: 1.5rem;
            text-align: right;
            padding-right: 0.125rem;
            line-height: 0.425rem;
            font-size: 0.175rem;
            cursor: default;
            i{
                font-size: 0.225rem;
                color: #f00;
                padding-right: 0.0375rem;
            }
        }
        .item-value{
            flex: 1;
            .el-input input{
                height: 0.425rem;
                line-height: 0.425rem;
            }
            .el-select{
                width: 100%;
            }
        }
    }

    .map-dialog{
        .el-dialog{
            height:75%;
            display: flex;
            flex-direction: column;
            .el-dialog__body{
                padding:0.125rem;
                flex:1;
                .edit-dialog-content{
                    width:100%;
                    height:100%;
                    .map-box{
                        width:100%;
                        #myMap{
                            height:100%;
                        }
                    }
                }
            }
        }
    }

    .edit-dialog-content{
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
    }
</style>
